package com.victor.modular.system.warpper;

import com.victor.common.constant.factory.ConstantFactory;
import com.victor.common.warpper.BaseControllerWarpper;
import com.victor.core.util.ToolUtil;

import java.util.List;
import java.util.Map;

/**
 * 观众管理的包装类
 *
 * @author jiabin.Zhao
 * @date 2017年2月13日 下午10:47:03
 */
public class AudienceWarpper extends BaseControllerWarpper {

    public AudienceWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        map.put("businessType1", ToolUtil.isEmpty(map.get("business_type1")) ? "":ConstantFactory.me().getAudienceName( (String)map.get("business_type1")));
        map.put("businessType2", ToolUtil.isEmpty(map.get("business_type2")) ? "":ConstantFactory.me().getAudienceName((String)map.get("business_type2")));
        map.put("businessType3", ToolUtil.isEmpty(map.get("business_type3")) ? "":ConstantFactory.me().getAudienceName((String) map.get("business_type3")));
        map.put("industryType", ToolUtil.isEmpty(map.get("industry_type")) ? "":ConstantFactory.me().getAudienceName((String) map.get("industry_type")));
        map.put("property", ToolUtil.isEmpty(map.get("property")) ? "":ConstantFactory.me().getAudienceName( (String)map.get("property")));
    }

}
